<?php
use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use yii\bootstrap\ActiveForm;
use yii\grid\GridView;
use yii\helpers\Url;
$this->params['breadcrumbs'][] = ['label' => $model->role_id, 'url' => ['roleupdate', 'id' => $model->role_id]];
?>


<div class="modal-dialog">
	<div class="modal-content">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			<h4 class="modal-title">修改角色</h4>
		</div>
		<div class="modal-body">
			<div id="type-creater-widget">
				<?php 
					$form = ActiveForm::begin([
						'options' => ['class' => 'form-horizontal',
						'id'=>'type-form'],
						'action'=>Url::to(['user/roleupdate']),
						'method'=>'post',
						'fieldConfig' => [
							'template' => '<div class="form-group"><center><label class="col-md-2 control-label" for="type-name-field">{label}</label></center><div class="col-md-8 controls">{input}{error}</div></div>'
						], 
					]);
				?>
				<?= $form->field($model, 'role_id', ['template'=>'<div class="form-group"><div class="col-md-8 controls">{input}{error}</div></div>'])->hiddenInput() ?>

				<?= $form->field($model, 'role_name',['inputOptions'=>['placeholder'=>'请输入角色名称']])->textInput(['maxlength' => true]) ?>

				<?php $model->role_status=1; echo $form->field($model,'role_status')->radioList(['1'=>'开启','0'=>'禁用'],['separator'=>" ","style"=>"padding-top:6px;"]); ?> 

				<?= $form->field($model, 'role_remark',['inputOptions'=>['placeholder'=>'请输入角色信息名称']])->textInput(['maxlength' => true]) ?>
				<div class="modal-footer">	
					<button type="button" class="btn btn-link" data-dismiss="modal" tabindex="6">取消</button>
					<?= Html::submitButton('保存', ['class' => 'btn btn-success','id'=>'category-create-btn']) ?>
				</div>
				<?php ActiveForm::end(); ?>
			</div>
		</div>
		
	</div>
</div>